<template>
  <div>
    <div class="header">
      <p>空气指数地图{{ name }}</p>
    </div>
    <baidu-map class="map" center="武汉">
      <bm-city-list anchor="BMAP_ANCHOR_TOP_LEFT"></bm-city-list>
    </baidu-map>
    <NavbarView></NavbarView>
  </div>
</template>

<script setup lang="ts">
import { ref } from 'vue'
import NavbarView from '@/components/navbar/IndexView.vue'
let id=ref("");
let name=ref("");
let aa=localStorage.getItem('city');
if(aa?.length){
  id.value=JSON.parse(aa).id;
name.value=JSON.parse(aa).name;
}
console.log(name.value);

</script>
<style lang="scss" scoped>
.header {
  height: 40px;
  background: #fff;
  line-height: 40px;
  font-size: 16px;
  text-align: center;
}
.map {
  height: calc(100vh - 40px);
  margin-bottom: 50px;
  .aa{
    width: 50px;
    height: 40px;
    background:red;
  }
}
</style>
